package com.kly.user.service;

import com.fqgj.common.api.Response;
import com.kly.user.dto.StoreAppsflyerUserMappingReq;
import com.kly.user.dto.StoreReportReq;
import com.kly.user.enums.AppsFlyerEventDefType;

import java.util.Map;

/**
 * 推送数据到appsFlyer
 * @author linqu
 */
public interface AppsflyerService {

    /**
     * appsFlyer 报告存储
     */
    Response storeAppsFlyerReport(StoreReportReq storeReportReq);


    /**
     * 异步推送数据到appsFlyer
     * @param pushType
     * @param pushData
     */
    Response asyncTraceEvent(AppsFlyerEventDefType pushType, Map<String, Object> pushData);

    /**
     * 存储appFlyers用户与系统用户映射关系
     */
    Response queryOrStoreIfNotExists(StoreAppsflyerUserMappingReq storeAppsflyerUserMappingReq);

    /**
     * 更新appflyer信息
     */
    Response updateAppflyerInfo(StoreAppsflyerUserMappingReq storeAppsflyerUserMappingReq);

    /**
     * 是否为新用户
     */
    Response<Boolean>  fetNewAccountFlag(String userCode);

}
